package cn.ym.ymcc.dto;

import cn.ym.ymcc.constant.GlobleConstant;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * 发送验证码的dto
 */
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Data
public class VerifyCodeDto {

    @NotEmpty(message = "验证码不能为空")
    private String imageCode;
    private String imageCodeKey;
    @NotEmpty(message = "手机号不能为空")
    @Pattern(regexp = GlobleConstant.PHONE_REGEX,message = "手机号格式错误")
    private String mobile;
}
